package com.glasgowrax.domain.directions;

import org.json.JSONException;
import org.json.JSONObject;


public class Agency {
	
	private String name;
	private String url;
	private String phoneNumber;	
	
	public Agency(JSONObject json) {
		try {
			name = (json.has("name")) ? json.getString("name") : "";	
			url = (json.has("url")) ? json.getString("url") : "";
			phoneNumber = (json.has("phone")) ? json.getString("phone") : "";
			
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	
	
}
